package com.my.user.service.impl;

import com.my.common.domain.UserAddress;
import com.my.common.service.UserService;

import java.util.ArrayList;
import java.util.List;

//暴露的接口的实现类
public class UserServiceImpl implements UserService {
    public List<UserAddress> getList(Integer id) {
        System.out.println("用户id="+id);
        List<UserAddress> list = new ArrayList<>();
        list.add(new UserAddress(1,"北京","张三","12345678","Y"));
        list.add(new UserAddress(2,"上海","李四","22345678","N"));
        try {
            //Thread.sleep(4000);//模拟网络延迟
            Thread.sleep(50);//模拟网络延迟
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return list;
    }
}
